#pragma once

#include "Iodp.h"

class CShmBlock;
class CClientMgr;

class CIodpModule : public CIodp
{
public:
    CIodpModule();
    ~CIodpModule();

public:
    static CShmBlock *GetShmBlock() { return m_pShmPtr; }
    static CClientMgr *GetClientMgr() { return m_pClntMgr; }

public:
    bool Init(void *pShm);
    void Destroy();

    char *GetModuleName();
    uint32_t GetShmSize();

    void *NewClient(void *pSvr, CClient *pClnt);
    bool DeleteClient(void *pNode);
    bool DataHandle(void *pHandle, const uint8_t *const pData, uint16_t nLen);

private:
    static CShmBlock *m_pShmPtr;
    static CClientMgr *m_pClntMgr;
};
